//ST*****************************************按钮*****************************************
function RxButton() {
}
RxButton.init = function(id, label, style, callback) {
    var ctrl = document.getElementById(id);
    if (ctrl == undefined || ctrl == null || ctrl == "") {
        ctrl = document.createElement("div");
    }

    ctrl.dispose = RxCommon.dispose;
    ctrl.dispose();

	if (id) {
    	ctrl.id = id;
	}
    ctrl.callback = callback;
    ctrl.rxtype = "RxButton";
    ctrl.className = "rxbutton";
    ctrl.innerHTML = label;

    if (style) {
        RxCommon.setStyle(ctrl, style);
    }

    ctrl.onclick = function() {
		var rxevent = {};
		rxevent.id = this.id;
		rxevent.name = "onclick";
		rxevent.self = this._self;
		rxevent.target = this;
		rxevent.source = this;
		rxevent.value = this.innerHTML
        this.callback(rxevent);
    };

    return ctrl;
}
//ED*****************************************按钮*****************************************
